# -*- coding: utf-8 -*-
__author__="Damien Lebrun"
__date__ ="$23-Nov-2008 12:43:58$"
__revision__ = "$Id: settings.py 372 2008-12-03 10:51:36Z dinoboff $"

import sys

OS_CHARSET = sys.getfilesystemencoding()
FILE_CHARSET = 'utf-8'

INCLUDE_PATTERNS = (
	(u'.', u'*.php',),
	(u'.', u'*.tpl',),
	(u'.', u'*.xhtml',),
	(u'.', u'*.html',),
	(u'.', u'*.htm',),
	(u'.', u'.ht*',),
	(u'.', u'*.css',),
	(u'.', u'*.txt',),
	(u'.', u'*.rst',),
	(u'.', u'README',),
	(u'.', u'INSTALL',),
	(u'.', u'*.js',),
	(u'.', u'*.png',),
	(u'.', u'*.ico',),
	(u'.', u'*.gif',),
	(u'.', u'*.jpe?g',),
	(u'.', u'*.xml',),
	(u'.', u'*.swf',),
	(u'.', u'*.sql',),
	(u'.', u'*.ini',),
	(u'.', u'*.mp3',),
	(u'.', u'*.gz',),
)

EXCLUDE_PATTERNS = (
	(u'.',		u'.svn/*',),
	(u'.',		u'.git/*',),
	(u'.',	 	u'.cvs/*',),
	(u'test/',	u'*',),
	(u'build/',	u'*',),
	(u'dist/', 	u'*',),
)


EOLFIX_TARGET_PATTERN = (
	u'*.php',
	u'*.tpl',
	u'*.xhtml',
	u'*.html',
	u'*.htm',
	u'.ht*',
	u'*.css',
	u'*.txt',
	u'*.rst',
	u'README',
	u'INSTALL',
	u'*.js',
	u'*.xml',
	u'*.sql',
	u'*.ini',
)


TOKKEN_REPLACEMENT_TARGET_PATTERN = (
	u'*.php',
	u'*.tpl',
	u'*.xhtml',
	u'*.html',
	u'*.htm',
	u'*.css',
	u'*.txt',
	u'*.rst',
	u'README',
	u'INSTALL',
	u'*.js',
	u'*.xml',
	u'*.sql',
	u'*.ini',
)

LUSSUMO_UPDATECHECK_URL = "http://lussumo.com/updatecheck/default.php?%s"


TEMPLATE_DEFAULT = u"""<?php
/**
Extension Name: %(EXT_NAME)s
Extension Url: http://lussumo.com/addons/
Description: Short description.
Version: 0.1.0
Author: Your name
Author Url: http://example.com/
 *
 * $Id: settings.py 372 2008-12-03 10:51:36Z dinoboff $
 * $HeadURL: http://vanilla-friends.googlecode.com/svn/tools/vf-manager/src/vanillafriends/utils/settings.py $
 */

if (!defined('IN_VANILLA')) exit();

"""

TEMPLATE_HTACCESS_ROOT = u"""Order Allow,Deny
Deny from All
"""

TEMPLATE_HTACCESS_ASSETS = u"""Order Allow,Deny
Allow from all
"""

TEMPLATE_FUNCTION = u"""<?php

if (!defined('IN_VANILLA')) exit();
"""

TEMPLATE_READ_ME = u"""INSTALLATION
============

In order for Vanilla to recognize an extension, it must be contained within it's
own directory within the extensions directory. So, once you have downloaded and
unzipped the extension files, you can then place the folder containing the
default.php file into your installation of Vanilla. The path to your extension's
default.php file should look like this::

	/path/to/vanilla/extensions/@@DIST_NAME@@/default.php

Once this is complete, you can enable the extension through the "Manage
Extensions" form on the settings tab in Vanilla.
"""

TEMPLATE_BUILD = u"""
from  vanillafriends.utils import Builder


Builder(
	base_dir='./',
	dist_name=None	# Name of folder where this extension should be installed
					# Use the extension name by default (Low-Val Vanilla => LowCalVanilla)
	minify=True,	# Should the css and js files compressed
	wiki_source='readme.rst' # Rst file that will be converted to google code wiki syntax
).build()
u"""

TEMPLATE_DOC = u"""<!DOCTYPE html>
<html>
	<head>
		<title>%(EXT_NAME)s</title>
		<style type="text/css">
			
			body {
				background: #fff;
				margin: 0px;
				padding: 0px;
				text-align: center;
			}
			body, div, p, blockquote, h1, h2, input {
				font-family: "Trebuchet MS", Arial, Verdana;
			}
			body, div, p, blockquote {
				font-size: 13px;
				line-height: 170%%;
			}
			a, a:link, a:visited {
				text-decoration: underline;
				color: #f60;
			}
			a:hover {
				text-decoration: underline;
				color: #c30;
			}
			h1#header {
				color: #ACBEDF;
				background: #F1F3FF;
				border-bottom: 1px solid #ACBEDF;
				margin: 0px;
				padding: 0px;
				margin-left: auto;
				margin-right: auto;
				font-size: 36px;
				padding: 20px 0px 20px 0px;
			}
			.document {
				margin-left: auto;
				margin-right: auto;
				text-align: left;
				width: 750px;
				padding: 20px 0px 0px 0px;
			}
			h2 {
				margin: 0px;
				padding: 0px;
			}
			ul {
				margin: 0;
				padding: 0 0 0 15px;
			}
			tt.literal {
				color: #960;
				font-family: courier;
				font-size: 12px;
				white-space: nowrap;
			}
			pre.literal-block {
				background: #FEFECC;
				margin: 10px 0px 10px 0px;
				padding: 10px;
				border-left: 4px solid #FCEEAA;
				display: block;
				overflow: auto;
			}
			fieldset {
				border: 0px;
				margin: 0px;
				padding: 0px;
			}
			fieldset ul {
				list-style: none;
				margin: 0px;
				padding: 8px 8px 2px 8px;
				background: #efefef;
			}
			fieldset label {
				float: left;
				margin: 0px 0px 6px 0px;
				width:30%%;
			}
			fieldset label.CheckBox {
				float: none;
				}
			fieldset label.CheckBox input {
				width: auto !important;
				}
			fieldset ul li {
				clear: left;
			}
			fieldset ul li input {
				margin-bottom: 6px;
				width: 50%%;
			}
			.Button {
				padding: 10px 0px 20px 0px;
			}
			.Button input {
				font-size: 14px;
				font-weight: bold;
				border: 0px;
				margin: 0px;
				padding: 0px;
				background: none;
				cursor: pointer;
				color: #64AE18;
			}
			.Button a {
				font-size: 14px;
				font-weight: bold;
				color: #64AE18;
			}
			.warning {
				background-color: #FFFECC;
				padding: 8px;
				margin: 10px 0px 0px 0px;
				border-top: 1px solid #FAEBB1;
				border-bottom: 1px solid #FAEBB1;
				color: #D57D00;
			}
			.warning p.first {
				padding: 0;
				margin: 0 0 13px;
				color: #c00;
				font-weight:800;
				text-transform: uppercase;
			}
			.warning,
			.warning p {
				color: #D57D00;
				margin: 13px 0;
			}
			.warning strong {
				color: #c00;
				display: block;
				padding: 0px 0px 4px 22px;
			}
			.warning p a,
			.warning p a:link,
			.warning p a:visited {
				color: #B16800;
			}
			.warning p a:hover {
				color: #c00;
			}
			.warning p code {
				background: none;
				margin: 10px 0px 10px 0px;
				padding: 0px;
				border: 0px;
				color: #960;
				font-family: courier;
				font-size: 12px;
				display: block;
			}
		</style>
	</head>
	<body>
		<h1 id="header">%(EXT_NAME)s</h1>
		%(DOC_BODY)s
	</body>
</html>
"""

TEMPLATE_WIKI = u"""#summary %(DESCRIPTION)s

= %(EXT_NAME)s =

%(DOC_BODY)s
"""